package figure8;

import java.io.File;

import figure8.GUI.TrackPanel;
import figure8.Network.Client;
import figure8.Network.NetworkConnection;
import figure8.events.TrackChangeListener;

public interface Track {
	public static enum Type {
		NONE,
		DRUM,
		WAV,
		MIDI,
		EFFECT;
	}
	
	public Type getType();
	public int getID();
	
	public void play();
    public void pause();
    public void stop();
    public void close();
    public String getName();
    public void setName(String name);
    
    public boolean getMuted();
    public void setMuted(boolean muted);
    
    public boolean getSoloing();
    public void setSoloing(boolean soloing);
    
    public float getVolume();
    public void setVolume(float volume);
    public boolean isDrum();
    public float getPan();
    public void setPan(float pan);
    
    public TrackPanel makeTrackPanel(Controller controller);
	public File getFile();
	public Boolean[][] getDrumMachine();
	
	public void send(NetworkConnection client, Client exclude);
	public void sendMeta(NetworkConnection client);
	public void updateMeta(String data);
	public void sendFile(NetworkConnection client, Client exclude);
	
	public String serializeMetadata();
	public String deserializeMetadata(String metadata);
	public boolean ready();
	
	public void addChangeListener(TrackChangeListener listener);
	public void removeChangeListener(TrackChangeListener listener);
	void filePart(String data);
	float percentage();
	public void finalize();
}
